_realname=unibilium
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=1.2.0
pkgrel=1
pkgdesc='A terminfo parsing library (mingw-w64)'
arch=('any')
url='https://github.com/mauke/unibilium/'
license=(LGPL3)
source=("$_realname-$pkgver.tar.gz::https://github.com/mauke/unibilium/archive/v$pkgver.tar.gz"
	"0001-unibilium-msys-makefile.patch")
sha1sums=("ed5150071bef1d1504fddbbe1c842ab47c1cbaec"
	"4852cc0e4e3174e5b60d6d1e1d74d8d234a4ebf3")

prepare() {
  cd "${_realname}-${pkgver}"
  patch -Np1 -i "${srcdir}/0001-unibilium-msys-makefile.patch"
}

build() {
  cd $_realname-$pkgver
  make PREFIX=${MINGW_PREFIX}
}

check() {
  cd $_realname-$pkgver
  make test
}

package() {
  cd $_realname-$pkgver
  make install PREFIX=${MINGW_PREFIX} DESTDIR="$pkgdir"
}
